package com.zzyl.nursing.vo.health;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import java.time.LocalDateTime;

@Data
public class HeartRateData {
    
    @JsonProperty("functionId")
    @NotNull(message = "functionId不能为空")
    private String functionId;
    
    @JsonProperty("eventTime")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @NotNull(message = "eventTime不能为空")
    private LocalDateTime eventTime;
    
    @JsonProperty("value")
    @Min(value = 0, message = "心率值不能小于0")
    @NotNull(message = "value不能为空")
    private Integer value;
}
